//
//  NoSearchRecordView.swift
//  MyTest
//
//  Created by guanzhongwang on 2021/5/17.
//

import UIKit

class NoSearchRecordView: UIView {

    init() {
        super.init(frame: .zero)
        backgroundColor = .white
        let tipLabel = UILabel()
        tipLabel.text = "你已进入无痕搜索模式"
        tipLabel.textColor = B000_COLOR
        addSubview(tipLabel)
        let messageLabel = UILabel()
        messageLabel.text = "在无痕搜索模式中,你的搜索历史和对应浏览历史将不会被记录"
        messageLabel.numberOfLines = 2
        messageLabel.textColor = B999_TITLE_COLOR
        messageLabel.font = Font_Size_12
        messageLabel.textAlignment = .center
        addSubview(messageLabel)
        let icon = UIImageView(image: UIImage(named: "wuhen"))
        addSubview(icon)
        
        messageLabel.snp.makeConstraints({
            $0.center.equalToSuperview()
            $0.width.equalToSuperview().dividedBy(1.5)
        })
        
        tipLabel.snp.makeConstraints({
            $0.bottom.equalTo(messageLabel.snp.top).offset(-15)
            $0.centerX.equalToSuperview()
        })
        icon.snp.makeConstraints({
            $0.centerX.equalToSuperview()
            $0.bottom.equalTo(tipLabel.snp.top).offset(-15)
        })
    }
    required init?(coder: NSCoder) {
        fatalError()
    }
}
